﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MetaProperties.Framework
{
    /// <summary>
    /// Defines an observable value.
    /// </summary>
    /// <typeparam name="T">The type of the contained value.</typeparam>
    public interface IObservable<T> : IObservable
    {
        /// <summary>
        /// Occurs when a property value changes.
        /// </summary>
        event ValueChangedEventHandler<T> ValueChanged;

        /// <summary>
        /// Occurs when a property value is set.
        /// </summary>
        event ValueChangedEventHandler<T> ValueSet;

        /// <summary>
        /// Gets the value of the observable property.
        /// </summary>
        T Value { get; }
    }
}
